#include <iostream>

using namespace std;

#pragma pack (1)


class A
{
public:
	A(int a = 76)
	{
		this->a = a;
		b = 3;
		c = 4;

		cout <<"Constructors ------"<<a<<endl;
		

	}

	~A()
	{
		cout <<"Destructor ------"<<a<<endl;
	}


	void printc()
	{
		cout<<"a = "<<a<<endl;
	}
	
private:
	int a:2;
	int b;
	int c;
};



void fun()
{
	A a;
	int *p;

	cout << "size  of "<<sizeof(a)<<endl;

	p = (int*)&a;
	cout<<"===="<<*((short*)p)<<endl;

	p =(int*)((char*) p + 4);
	cout<<"===="<<*p<<endl;

	//p = p + 4;
	p =(int*)((char*) p + 4);
	cout<<"===="<<*p<<endl;
}

int main(int argc, char* argv[])
{

	cout <<argv[0]<<endl;
	fun();
	system("pause");
	return 0;
}